'''
Created on Jun 17, 2012

@author: mariano

'''
#pylint: disable=C0301 
#Images and positions
MEDIA = '/home/mariano/proyectos/mariano-semelman/multi-game/theory-of-mind/media/'


def full_transition(root_dir, resources, task_number):
    trans = [{'resource':root_dir + resource} for resource in resources]
    return {'type':'full',
            'name': task_number,
            'full_sprites': trans
            }


#^ (Filenames are long)

def binary_choose(root_dir, option1, option2, subject, task_number):
    return {'type':'choose',
            'name': task_number,
        'button_sprites':
        [ {'val':'1',
            'resource':root_dir + option1,
            'position':(600, 75)},
          {'val':'2',
            'resource':root_dir + option2,
            'position':(600, 400)}
         ],
        'normal_sprites':
        [ {'resource':root_dir + subject,
            'position':(150, 200)}]}

def caritas(task_number):
    return {
        'type':'choose',
        'name': task_number,
        'normal_sprites':[],
        'button_sprites':
        [
            {
                'val':'1',
                'resource':MEDIA + 'tarea-7/feliz.jpg',
                'position':(250, 250)},
            {
                'val':'2',
                'resource':MEDIA + 'tarea-7/neutro.jpg',
                'position':(450, 250)},
            {
                'val':'3',
                'resource':MEDIA + 'tarea-7/triste.jpg',
                'position':(650, 250)}]
    }


#tarea 1
_ZANAHORIA = 'tarea-1/zanahoria.jpg'
_GALLETITA = 'tarea-1/galletita.jpg'
_SR_PEREZ = 'tarea-1/sr-perez.jpg'

#tarea 2
_ARBUSTOS = 'tarea-2/arbustos.jpg'
_POLY = 'tarea-2/poly.jpg'
_GARAGE = 'tarea-2/garage.jpg'

#tarea 3
_CAJA_CERRADA = 'tarea-3/caja-cerrada.jpg'
_CAJA_ABIERTA = 'tarea-3/caja-abierta.png'
_CAJA_CERRADA_MARTINA = 'tarea-3/caja-cerrada-martina.jpg'
# tarea 4
_CURITAS_CERRADA = 'tarea-4/curitas-cerrada.jpg'
_CURITAS_ABIERTA = 'tarea-4/curitas-chancha.jpg'
_CURITAS_CERRADA_PEDRO = 'tarea-4/curitas-cerrada-pedro.jpg'
# tarea 5
_PLACARD = 'tarea-5/placard.jpg'
_MOCHILA = 'tarea-5/mochila.jpg'
_ALEJO = 'tarea-5/alejo.jpg'
#tarea 6
_LAYS_CERRADO = 'tarea-6/cerrado.jpg'
_LAYS_ABIERTO = 'tarea-6/abierto.jpg'
_LAYS_CERRADO_TOM = 'tarea-6/cerrado-tom.jpg'

#all tasks
SET_OF_SPRITES_CONFIGS = [
                          #Screen 1
                          binary_choose(MEDIA, _ZANAHORIA, _GALLETITA, _SR_PEREZ, '1'),
                          #Screen 2
                          binary_choose(MEDIA, _ARBUSTOS, _GARAGE, _POLY, '2'),
                          #Screen 3
                          full_transition(MEDIA, [ _CAJA_CERRADA, _CAJA_ABIERTA, _CAJA_CERRADA, _CAJA_CERRADA_MARTINA], '3'),
                          #Screen 4
                          full_transition(MEDIA, [_CURITAS_CERRADA, _CURITAS_ABIERTA, _CURITAS_CERRADA, _CURITAS_CERRADA_PEDRO], '4'),
                          #Screen 5
                          binary_choose(MEDIA, _PLACARD, _MOCHILA, _ALEJO, '5'),
                          #Screen 6
                          full_transition(MEDIA, [_LAYS_CERRADO, _LAYS_ABIERTO, _LAYS_CERRADO, _LAYS_CERRADO_TOM], '6'),
                          #Screen 7
                          {
                            'type': 'nested',
                            'name': '7',
                            'screens':
                                [
                                 #Subscreen 7.1
                                 caritas('7.1'),
                                 #Subscreen 7.2
                                 full_transition(MEDIA, ['tarea-7/ninio de espalda.jpg'], '7.2'),
                                 #Subscreen 7.3
                                 caritas('7.3'),
                                 #Intermezzo
                                 full_transition(MEDIA, ['white.png'], '7.3.1'),
                                 #Subscreen 7.4
                                 caritas('7.4')
                                 ]
                            },

                          ]
CONGRATS_PICTURE = MEDIA + 'congrats.jpg'

#Tuio configuration
TUIO_ENABLE = False

#Game Configuration
FULLSCREEN = True
